Portable Profiling of Memory Allocation in Java

نویسنده

  • Walter Binder
چکیده

This paper presents a portable framework to profile memory allocation in standard Java Virtual Machines. We extended our exact profiler JP, which generates a method call tree (MCT) for each thread in the system, in order to store information concerning object allocation in the MCT. Our primary design goals were to use platform-independent metrics for memory allocation and to minimize the extra overhead caused by memory profiling. For each method invocation context, the profiler preserves the number of allocated objects of each type. We exploit the fact that an object allocation is usually followed by a constructor invocation, in order to compute the number of object allocations from the MCT. A static analysis of constructor code allows to distinguish between the invocation of an alternate or superclass constructor and object allocation within the constructor. Arrays are treated specially, as we instrument array allocation instructions in order to preserve accumulated information on the type, number, and size of allocated arrays for each method invocation context. A performance evaluation shows that the extra overhead due to memory profiling is small.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Comprehensive Profiling Support in the Java Virtual Machine

Existing profilers for Java applications typically rely on custom instrumentation in the Java virtual machine, and measure only limited types of resource consumption. Garbage collection and multi-threading pose additional challenges to profiler design and implementation. In this paper we discuss a general-purpose, portable, and extensible approach for obtaining comprehensive profiling informati...

متن کامل

ProfBuilder: A Package for Rapidly Building Java Execution Profilers

ProfBuilder is a collection of Java classes that provide an easy method for constructing Java execution profiling tools. By instrumenting Java bytecode, a programmer can measure dynamic properties of an application, such as bytecode count, number of memory allocations, cache misses and branches. ProfBuilder provides an easy way to create customized tools to measure these and other properties by...

متن کامل

Porting the JMTk memory management toolkit

JMTk is a memory management toolkit written in Java, originally for the JikesRVM Java Virtual Machine. JMTk provides reusable components for the development of allocation and garbage collection algorithms, an efficient implementation of a rapidly growing number of memory management schemes, and is an important enabler for memory management research. A portable version of JMTk will allow the gro...

متن کامل

Exact and Portable Profiling for the JVM Using Bytecode Instruction Counting

This paper presents a novel profiling approach, which is entirely based on program transformation techniques in order to enable exact profiling, preserving complete call stacks, method invocation counters, and bytecode instruction counters. We exploit the number of executed bytecode instructions as profiling metric, which has several advantages, such as making the instrumentation entirely porta...

متن کامل

A Portable and Customizable Profiling Framework for Java Based on Bytecode Instruction Counting

Prevailing profilers for Java, which rely on standard, native-code profiling interfaces, are not portable, give imprecise results due to serious measurement perturbation, and cause excessive overheads. In contrast, program transformations allow to generate reproducible profiles in a fully portable way with significantly less overhead. This paper presents a profiling framework that instruments J...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2005